from django.conf.urls.defaults import *


urlpatterns = patterns('bb.views',
    url(
        r'^$',
        'index',
        name='index'
    ),
    url(
        r'^topic/(?P<topic_id>\d+)/add_talk',
        'add_talk',
        name='add_talk',
    ),
    url(
        r'^topic/(?P<topic_id>\d+)',
        'topic',
        name='topic'
    ),
    url(
        r'^board/(?P<board_slug>\w+)/add_topic',
        'add_topic',
        name='add_topic'
    ),

    url(
        r'^board/(?P<board_slug>\w+)$',
        'board',
        name='board'
    ),
)

urlpatterns += patterns('',\
    url(
        r'^member/login$',
        'django.contrib.auth.views.login',
        { 'template_name':'member/login.html', "redirect_field_name" : 'next' },
        name='member_login',
    ),
    url(
        r'^member/register$',
        'bb.views.member_register',
        name='member_register',
    ),
    url(
        r'^member/logout$',
        'django.contrib.auth.views.logout',
        name='member_logout',
    )
)
